Lqr-based anti-sway control method and system for lifting system

ABSTRACT

The present invention provides a linear quadratic regulator (LQR)-based anti-sway control method for a hoisting system, comprising the following steps: obtaining a target position of a trolley, and obtaining a planned real-time path of the trolley according to the maximum velocity vm and maximum acceleration am of the trolley; establishing a dynamic model of the hoisting system according to a Lagrange&#39;s equation, for the Lagrange&#39;s equation, the trolley displacement x, the spreader sway angle θ, and the rope length l of the hoisting system being selected as generalized coordinate directions; observing lumped disturbance d using an extended state observer, and compensating for same in a controller, the lumped disturbance d comprising the dynamic model error and external disturbance to the hoisting system; tracking the planned real-time path of the trolley by a Q matrix and an R matrix using a linear quadratic regulator controller. The LQR-based anti-sway control method for a hoisting system provided by the present invention can make the hoisting system operate more smoothly, reduce sway during operation, and quickly eliminate sway when in place while observing the lumped disturbance using an extended state observer.

TECHNICAL FIELD

The present invention relates to the field of hoisting systemtransportation, and more particularly to a LQR-based anti-sway controlmethod and system for a hoisting system.

BACKGROUND ART

Hoisting systems such as tire cranes, rail cranes, bridge cranes, etc.are widely used in the field of industrial transportation because oftheir strong load capacity and high flexibility. Tire cranes and bridgecranes are the two most common equipment in port terminals, which arerespectively responsible for the container transportation between shipsand internal trucks, between yards and internal trucks, and betweenyards and external trucks. At present, the hoisting system operation ofport terminals is mostly manual. With the improvement of therequirements for throughput, gradually the manual operation mode can notmeet the demand.

The operation process of the hoisting system is mainly divided intothree stages: rising, falling and moving. In actual operation, the keylink affecting the efficiency is the moving stage. Moving will cause thespreader of the hoisting system to shake, so that the container can notbe accurately grasped when the spreader is lowered. Therefore, it isparticularly important to control the anti-sway of the trolley or cartin the moving stage. Hoisting system is a typical underactuated system,which is a system with independent control input variable degrees offreedom less than the system degrees of freedom. The underactuatedsystem has fewer actuators. Although it has the advantage of low cost,the underactuated system brings difficulties to the system control. Forthe movement of the hoisting system, the goal is to reach the designatedposition quickly and accurately and the sway angle is as small aspossible in the process of movement, but the hoisting system can notdirectly act on the sway angle, but can only control its position orvelocity.

Accordingly, there is a need to provide an anti-sway method, which cancontrol the shaking of the hoisting system in the moving stage.

SUMMARY OF THE INVENTION

The technical problem to be solved by the present invention is toprovide a LQR-based anti-sway control method and system for a hoistingsystem which can control the shaking of the hoisting system in themoving stage and quickly eliminate sway when in place by using anextended state observer and a linear quadratic regulator.

The technical solution adopted by the present invention to solve theabove technical problem is to provide a LQR-based anti-sway controlmethod for a hoisting system, characterized in that comprising thefollowing steps:

obtaining a target position of a trolley, and obtaining a plannedreal-time path of the trolley according to the maximum velocity v_(m)and maximum acceleration a_(m) of the trolley;establishing a dynamic model of the hoisting system according to aLagrange's equation, for the Lagrange's equation, the trolleydisplacement x, the spreader sway angle θ, and the rope length l of thehoisting system being selected as generalized coordinate directions;observing lumped disturbance d using an extended state observer, andcompensating for same in a controller, the lumped disturbance dcomprising the dynamic model error and external disturbance to thehoisting system; tracking the planned real-time path of the trolley by aQ matrix and an R matrix using a linear quadratic regulator controller.

Optionally, obtaining the planned real-time path of the trolleyaccording to the maximum velocity v_(m) and maximum acceleration a_(m)of the trolley specifically comprising the following formula:

${{\overset{.}{x}}_{r}(t)} = \left\{ \begin{matrix}{{\frac{v_{m}}{2}\left( {1 - {\cos\pi\frac{2a_{m}}{v_{m}}t}} \right)},{0 < t \leq \frac{v_{m}}{2a_{m}}}} \\{v_{m},{\frac{v_{m}}{2a_{m}} < t \leq {\frac{v_{m}}{2a_{m}} + t_{c}}}} \\{{\frac{v_{m}}{2}\left\lbrack {1 + {\cos\pi\frac{2a_{m}}{v_{m}}\left( {t - \frac{v_{m}}{2a_{m}} - t_{c}} \right)}} \right\rbrack},{{\frac{v_{m}}{2a_{m}} + t_{c}} \leq t \leq {\frac{v_{m}}{a_{m}} + t_{c}}}}\end{matrix} \right.$

wherein, t is the running time of the trolley, t_(c) is the constantvelocity time of the trolley, {dot over (x)}_(r)(t) is the real-timevelocity of the planned path of the trolley, obtaining the plannedreal-time path of the trolley by integrating, the constant velocity timet_(c) is determined according to the target position path of thetrolley. Optionally, establishing a nonlinear equation of the systemaccording to the Lagrange equation as follows:

$\left\{ \begin{matrix}{{{\left( {M + m} \right)\overset{¨}{x}} + {m\overset{¨}{l}\sin\theta} + {2m\overset{.}{l}\overset{.}{\theta}\cos\theta} + {{ml}\overset{¨}{\theta}\cos\theta} - {{ml}{\overset{.}{\theta}}^{2}\sin\theta} + {\mu\overset{.}{x}}} = F} \\{{{2\overset{.}{l}\overset{.}{\theta}} + {l\overset{¨}{\theta}} + {\overset{¨}{x}\cos\theta} + {g\sin\theta}} = 0} \\{{{m\overset{¨}{l}} + {m\overset{¨}{x}\sin\theta} - {{ml}{\overset{.}{\theta}}^{2}} - {{mg}\cos\theta}} = F_{1}}\end{matrix} \right.$

wherein, M is the trolley mass, m is the spreader mass, and l is therope length, θ is the spreader sway angle, μ is the frictioncoefficient, x is the trolley displacement, F is the motor force, F₁ isthe pulling force between the trolley and the spreader, and g is thegravitational acceleration.

Optionally, the rope length l remains unchanged, the spreader sway angleθ is greater than −5° and less than 5°, simplifying the nonlinearequation as follows:

${\overset{.}{l} = {\overset{¨}{l} = 0}},{{\cos\theta} \approx 1},{{\sin\theta} \approx \theta}$${{\overset{¨}{\theta}\cos\theta} - {{\overset{.}{\theta}}^{2}\sin\theta}} = {{\frac{d}{dt}\left( {\overset{.}{\theta}\cos\theta} \right)} = {{\frac{d}{dt}\left( \overset{.}{\theta} \right)} = \overset{¨}{\theta}}}$

obtaining the following linearization equation by further linearization:

$\left\{ \begin{matrix}{{M\overset{¨}{x}} - {{mg}\theta} + {\mu\overset{.}{x}} + F} \\{{{l\overset{¨}{\theta}} + \overset{¨}{x} + {g\theta}} = 0}\end{matrix} \right.$

Optionally, obtaining the following equation by introducing a lumpeddisturbance d in the linearization equation:

$\left\{ \begin{matrix}{{{M\overset{¨}{x}} - {{mg}\theta} + {\mu\overset{.}{x}} - d} = F} \\{{{l\overset{¨}{\theta}} + \overset{¨}{x} + {g\theta}} = 0}\end{matrix} \right.$

taking the state variables as the trolly displacement x and spreadersway angle θ, input as motor force F, establishing the following stateequation, and rewriting the said equation into the standard stateequation form in control theory:

$\left\{ \begin{matrix}{\overset{.}{X} = {{AX} + {B\left( {u + d} \right)}}} \\{y_{m} = {C_{m}X}}\end{matrix} \right.$

wherein:

$A = \begin{bmatrix}0 & 1 & 0 & 0 \\0 & {- \frac{\mu}{M}} & \frac{mg}{M} & 0 \\0 & 0 & 0 & 1 \\0 & \frac{\mu}{Ml} & {- \frac{\left( {M + m} \right)g}{Ml}} & 0\end{bmatrix}$ $B = \begin{bmatrix}0 & \frac{1}{M} & 0 & {- \frac{1}{Ml}}\end{bmatrix}^{T}$ $C_{m} = \left\lbrack \begin{matrix}1 & 0 & 0 & \left. 0 \right\rbrack\end{matrix} \right.$

u is the control variable, X is the vector representing the systemstate, y_(m) is the system output, A is the system state matrix, B isthe system input matrix, Cm is the system output matrix, and thesubscript m represents the directly observable.

Optionally, a new variable x₅=d is introduced into the state equation, dis used to represent lumped disturbance:

$\left\{ \begin{matrix}{{\overset{˙}{x}}_{1} = x_{2}} \\{{\overset{˙}{x}}_{2} = {\frac{1}{M}\left( {{{- \mu}x_{2}} + {mgx_{3}} + x_{5} + u} \right)}} \\{{\overset{˙}{x}}_{3} = x_{4}} \\{{\overset{.}{x}}_{4} = {{- \frac{1}{Ml}}\left( {{{- \mu}x_{2}} + {\left( {M + m} \right)gx_{3}} + x_{5} + u} \right)}} \\{{\overset{.}{x}}_{5} = \overset{.}{d}}\end{matrix} \right.$ y_(m) = C_(m)X

wherein, x₁ is the displacement of the trolley, x₂ is the trolleyvelocity, x₃ is the spreader sway angle, x₄ is the angle velocity of thespreader sway angle.

Optionally, in order to realize the observation of system state andlumped disturbance, the extended state observer is designed as follows:

$\left\{ \begin{matrix}{{\overset{.}{\overset{\hat{}}{x}}}_{1} = {{\overset{\hat{}}{x}}_{2} + {l_{1}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{2} = {{\frac{1}{M}\left( {{{- \mu}{\overset{\hat{}}{x}}_{2}} + {mg{\overset{\hat{}}{x}}_{3}} + {\overset{\hat{}}{x}}_{5} + u} \right)} + {l_{2}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{3} = {{\overset{\hat{}}{x}}_{4} + {l_{3}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{4} = {{- {\frac{1}{Ml}\left\lbrack {{{- \mu}{\overset{\hat{}}{x}}_{2}} + {\left( {M + m} \right)g{\overset{\hat{}}{x}}_{3}} + {\overset{\hat{}}{x}}_{5} + u} \right\rbrack}} + {l_{4}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{5} = {l_{5}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}\end{matrix} \right.$

wherein, {circumflex over (x)}₁, {circumflex over (x)}₂, {circumflexover (x)}₃, {circumflex over (x)}₄, {circumflex over (x)}₅ is theobserved value of x₁, x₂, x₃, x₄, x₅, l₁, l₂, l₃, l₄, l₅ is the observergain to be designed.

Optionally, tracking the planned real-time path of the trolley by a Qmatrix and an R matrix using a linear quadratic regulator controllercomprising the use of the following composite control:

u=K _(x)[{circumflex over (x)} ₁ {circumflex over (x)} ₂ {circumflexover (x)} ₃ x ₄]−{circumflex over (x)} ₅

wherein, K_(x) is the feedback control gain.

The technical solution adopted by the present invention to solve theabove technical problem is to provide a LQR-based anti-sway controlsystem for a hoisting system, comprising: a server which comprising amemory, a processor and a computer program stored on the memory andrunning on the processor, when the the program executed by theprocessor, the said LQR-based anti-sway control method for the hoistingsystem is executed.

The technical solution adopted by the present invention to solve theabove technical problem is to provide a computer readable storage mediumon which a computer program is stored, when the program is executed by aprocessor, the said LQR-based anti-sway control method for the hoistingsystem is executed.

Compared to the prior art, the technical solutions of embodiments of thepresent invention have the following advantageous effects.

The LQR-based anti-sway control method for a hoisting system provided bythe present invention, obtaining a target position of a trolley, andobtaining a planned real-time path of the trolley according to themaximum velocity v_(m) and maximum acceleration a_(m) of the trolley andestablishing a dynamic model of the hoisting system according to aLagrange's equation, which can make the hoisting system operate moresmoothly, reduce sway during operation, and quickly eliminate sway whenin place while observing the lumped disturbance using an extended stateobserver.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a physical schematic diagram of the two-dimensional movementof the hoisting system according to an embodiment of the presentinvention;

FIG. 2 is a flow chart of a LQR-based anti-sway control method for ahoisting system according to an embodiment of the present invention;

FIG. 3 is a control structure diagram of a LQR-based anti-sway controlmethod for a hoisting system according to an embodiment of the presentinvention;

FIG. 4 is a comparison diagram of the trolley displacement, angle andcontrol amount whether a planned path is used in an embodiment of thepresent invention;

FIG. 5 shows the control effect comparison diagram between the LQRcontroller based on the extended state observer in an embodiment of thepresent invention and other controllers.

DETAILED DESCRIPTION OF THE INVENTION

The present invention will be further described below in combinationwith the accompanying drawings and embodiments.

In the following description, many specific details are set forth inorder to provide a thorough understanding of the present invention.However, it will be apparent to those skilled in the art that thepresent invention can be practiced without these specific details.Therefore, the specific details are only exemplary, and the specificdetails may vary from the spirit and scope of the unrestrained and arestill considered to be within the spirit and scope of the presentinvention.

The hoisting system in this embodiment can be used for port logistics.The hoisting system includes a crane, which includes but is not limitedto a tire crane, a straddle carrier and a stacker. The following takes atire crane as an example to illustrate the working principle of theautomatic deviation correction control method of the hoisting system ofthe present invention.

Now refer to FIG. 1 , FIG. 1 is a physical schematic diagram of thetwo-dimensional movement of the hoisting system according to anembodiment of the present invention. Wherein, M is the trolley mass, mis the spreader mass, and l is the rope length, θ is the spreader swayangle, is the friction coefficient, x is the trolley displacement, F isthe motor force, F₁ is the pulling force between the trolley and thespreader, and g is the gravitational acceleration.

FIG. 2 is a flow chart of a Linear Quadratic Regulator (LQR)-basedanti-sway control method for a hoisting system according to anembodiment of the present invention. First step 101: obtaining a targetposition of a trolley, and obtaining a planned real-time path of thetrolley according to the maximum velocity v_(m) and maximum accelerationa_(m) of the trolley. Then step 102: establishing a dynamic model of thehoisting system according to a Lagrange's equation, for the Lagrange'sequation, the trolley displacement x, the spreader sway angle θ, and therope length l of the hoisting system being selected as generalizedcoordinate directions. Then step 103: observing lumped disturbance dusing an extended state observer, and compensating for same in acontroller, the lumped disturbance d comprising the dynamic model errorand external disturbance to the hoisting system. Last step 104: trackingthe planned real-time path of the trolley by a Q matrix and an R matrixusing a linear quadratic regulator controller.

Wherein, a Q matrix and an R matrix are inherent matrices in LQR (linearquadratic regulator) method. Q is the weight matrix of state variablesand diagonal matrix. The larger the corresponding value of Q, the moreimportant the state is in the performance function. R is the weight ofthe control quantity. The larger the corresponding value of R, the moreimportant the state is in the performance function.

In a particular implementation, obtaining the planned real-time path ofthe trolley according to the maximum velocity v_(m) and maximumacceleration a_(m) of the trolley specifically comprising the followingformula:

${{\overset{˙}{x}}_{r}(t)} = \left\{ \begin{matrix}{{\frac{v_{m}}{2}\left( {1 - {\cos\pi\frac{2a_{m}}{v_{m}}t}} \right)},{0 < t \leq \frac{v_{m}}{2a_{m}}}} \\{v_{m},{\frac{v_{m}}{2a_{m}} < t \leq {\frac{v_{m}}{2a_{m}} + t_{c}}}} \\{{\frac{v_{m}}{2}\left\lbrack {1 + {\cos\pi\frac{2a_{m}}{v_{m}}\left( {t - \frac{v_{m}}{2a_{m}} - t_{c}} \right)}} \right\rbrack},{{\frac{v_{m}}{2a_{m}} + t_{c}} \leq t \leq {\frac{v_{m}}{a_{m}} + t_{c}}}}\end{matrix} \right.$

wherein, t is the running time of the trolley, t_(c) is the constantvelocity time of the trolley, {dot over (x)}_(r)(t) is the real-timevelocity of the planned path of the trolley, obtaining the plannedreal-time path of the trolley by integrating {dot over (x)}_(r)(t), theconstant velocity time t_(c) is determined according to the targetposition path of the trolley.

For the vibration system with multiple degrees of freedom, the Lagrangeequation in the dynamic model of the hoisting system establishedaccording to the Lagrange equation is as follows:

$\left\{ \begin{matrix}{{L\left( {q,\overset{.}{q}} \right)} = {{T\left( {q,\overset{.}{q}} \right)} - {V\left( {q,\overset{.}{q}} \right)}}} \\{{{\frac{d}{dt}\left( \frac{\partial L}{\partial{\overset{˙}{q}}_{i}} \right)} - \frac{\partial L}{\partial q_{i}}} = Q_{i}}\end{matrix} \right.$

Wherein, q represents generalized coordinates, Q represents generalizedforce, L represents Lagrangian operator, T represents kinetic energy ofthe system, V represents potential energy of the system.

The crane operation scenario is relatively complex, and the followingassumptions are first made when modeling:

1. During the movement of the trolley or the cart, the trolley or thecart is in a static state.2. There is friction between the trolley and the track, and the frictionis proportional to the trolley velocity.3. Because cranes mostly use spreaders with eight rope, the spreadersare regarded as particles in two-dimensional motion.4. Ignore the influence of air resistance, wind force, friction betweentrolley and steel wire rope and other factors.

Selecting three generalized coordinates of the rope length l, thespreader sway angle θ and the trolley displacement x according to thesaid dynamic differential equation to establish a nonlinear equation ofthe system according to the Lagrange equation as follows:

$\left\{ \begin{matrix}{{{\left( {M + m} \right)\overset{¨}{x}} + {m\overset{¨}{l}\sin\theta} + {2m\overset{.}{l}\overset{˙}{\theta}\cos\theta} + {ml\overset{¨}{\theta}\cos\theta} - {ml{\overset{˙}{\theta}}^{2}\sin\theta} + {\mu\overset{.}{x}}} = F} \\{{{2\overset{.}{l}\overset{˙}{\theta}} + {l\overset{¨}{\theta}} + {\overset{¨}{x}\cos\theta} + {g\sin\theta}} = 0} \\{{{m\overset{¨}{l}} + {m\overset{¨}{x}\sin\theta} - {ml{\overset{˙}{\theta}}^{2}} - {mg\cos\theta}} = F_{1}}\end{matrix} \right.$

wherein, M is the trolley mass, m is the spreader mass, and l is therope length, θ is the spreader sway angle, is the friction coefficient,x is the trolley displacement, F is the motor force, F₁ is the pullingforce between the trolley and the spreader, and g is the gravitationalacceleration.

In the process of crane operation, the movement of the cart and thetrolley is often carried out separately, so it can be considered thatthe rope length l remains unchanged. At the same time, because the steelwire rope length l is relatively long, in order to ensure the safety ofoperation and avoid collision, the spreader sway angle θ can not be toobig, the spreader sway angle θ is greater than −5° and less than 5°,simplifying the nonlinear equation as follows:

${\overset{.}{l} = {\overset{¨}{l} = 0}},{{\cos\theta} \approx 1},{{\sin\theta} \approx \theta}$${{\overset{¨}{\theta}\cos\theta} - {{\overset{˙}{\theta}}^{2}\sin\theta}} = {{\frac{d}{dt}\left( {\overset{˙}{\theta}\cos\theta} \right)} = {{\frac{d}{dt}\left( \overset{˙}{\theta} \right)} = \overset{¨}{\theta}}}$

obtaining the following linearization equation by further linearization:

$\left\{ \begin{matrix}{{{M\overset{¨}{x}} - {{mg}\theta} + {\mu\overset{.}{x}}} = F} \\{{{l\overset{¨}{\theta}} + \overset{¨}{x} + {g\theta}} = 0}\end{matrix} \right.$

Obtaining the following equation by introducing the lumped disturbance din the linearization equation:

$\left\{ \begin{matrix}{{{M\overset{¨}{x}} - {{mg}\theta} + {\mu\overset{.}{x}}} = F} \\{{{l\overset{¨}{\theta}} + \overset{¨}{x} + {g\theta}} = 0}\end{matrix} \right.$

taking the state variables as the trolley displacement x and spreadersway angle θ, input as motor force F, establishing the following stateequation, and rewriting the said equation into the standard stateequation form in control theory:

$\left\{ \begin{matrix}{\overset{˙}{X} = {{AX} + {B\left( {u + d} \right)}}} \\{y_{m} = {C_{m}X}}\end{matrix} \right.$

wherein:

$A = \begin{bmatrix}0 & 1 & 0 & 0 \\0 & {- \frac{\mu}{M}} & \frac{mg}{M} & 0 \\0 & 0 & 0 & 1 \\0 & \frac{\mu}{Ml} & {- \frac{\left( {M + m} \right)g}{Ml}} & 0\end{bmatrix}$ $B = \begin{bmatrix}0 & \frac{1}{M} & 0 & {- \frac{1}{Ml}}\end{bmatrix}^{T}$ $C_{m} = \begin{bmatrix}1 & 0 & 0 & 0\end{bmatrix}$

u is the control variable, X is the vector representing the systemstate, y_(m) is the system output, A is the system state matrix, B isthe system input matrix, Cm is the system output matrix, and thesubscript m represents the directly observable.

A new variable x₅=d is introduced into the state equation, d is used torepresent lumped disturbance:

$\left\{ \begin{matrix}{{\overset{˙}{x}}_{1} = x_{2}} \\{{\overset{˙}{x}}_{2} = {\frac{1}{M}\left( {{{- \mu}x_{2}} + {mgx_{3}} + x_{5} + u} \right)}} \\{{\overset{˙}{x}}_{3} = x_{4}} \\{{\overset{.}{x}}_{4} = {{- \frac{1}{Ml}}\left( {{{- \mu}x_{2}} + {\left( {M + m} \right)gx_{3}} + x_{5} + u} \right)}} \\{{\overset{.}{x}}_{5} = \overset{.}{d}}\end{matrix} \right.$ y_(m) = C_(m)X

wherein, x₁ is the trolley displacement, x₂ is the trolley velocity, x₃is the spreader sway angle, x₄ is the angle velocity of the spreadersway angle.

In actual operation, the spreader sway angle θ It is difficult tomeasure accurately, and the system modeling errors including the changeof lifting weight and rope length l, as well as external disturbancesincluding wind, will affect the control performance. The extended stateobserver is used to observe the lumped disturbance d and compensate inthe controller, the lumped disturbance d includes system modeling errorsand external disturbances.

A new variable x₅=d is introduced into the state equation, d is used torepresent lumped disturbance:

$\left\{ \begin{matrix}{{\overset{˙}{x}}_{1} = x_{2}} \\{{\overset{˙}{x}}_{2} = {\frac{1}{M}\left( {{{- \mu}x_{2}} + {mgx_{3}} + x_{5} + u} \right)}} \\{{\overset{˙}{x}}_{3} = x_{4}} \\{{\overset{.}{x}}_{4} = {{- \frac{1}{Ml}}\left( {{{- \mu}x_{2}} + {\left( {M + m} \right)gx_{3}} + x_{5} + u} \right)}} \\{{\overset{.}{x}}_{5} = \overset{.}{d}}\end{matrix} \right.$ y_(m) = C_(m)X

wherein, x₁ is the trolley displacement, x₂ is the trolley velocity, x₃is the spreader sway angle, x₄ is the angle velocity of the spreadersway angle.

The system modeling error and external disturbance d appear in the twochannels x₂, x₄ with equal values, so the state equation is rewritten asfollows:

$\left\{ \begin{matrix}{{\overset{˙}{x}}_{1} = x_{2}} \\{{\overset{˙}{x}}_{2} = {{{- \frac{\mu}{M}}x_{2}} + {\frac{mg}{M}x_{3}} + {\frac{1}{M}u} + d}} \\{{\overset{˙}{x}}_{3} = x_{4}} \\{{\overset{.}{x}}_{4} = {{{- \frac{\mu}{Ml}}x_{2}} + {{- \frac{\left( {M + m} \right)g}{lM}}x_{3}} - {\frac{1}{Ml}u} + d}} \\{{\overset{.}{x}}_{5} = \overset{.}{d}}\end{matrix} \right.$

In order to realize the observation of system state and lumpeddisturbance, the extended state observer is designed as follows:

$\left\{ \begin{matrix}{{\overset{.}{\overset{\hat{}}{x}}}_{1} = {{\overset{\hat{}}{x}}_{2} + {l_{1}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{2} = {{\frac{1}{M}\left( {{{- \mu}{\overset{\hat{}}{x}}_{2}} + {mg{\overset{\hat{}}{x}}_{3}} + {\overset{\hat{}}{x}}_{5} + u} \right)} + {l_{2}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{3} = {{\overset{\hat{}}{x}}_{4} + {l_{3}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{4} = {{- {\frac{1}{Ml}\left\lbrack {{{- \mu}{\overset{\hat{}}{x}}_{2}} + {\left( {M + m} \right)g{\overset{\hat{}}{x}}_{3}} + {\overset{\hat{}}{x}}_{5} + u} \right\rbrack}} + {l_{4}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{5} = {l_{5}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}\end{matrix} \right.$

wherein, {circumflex over (x)}₁, {circumflex over (x)}₂, {circumflexover (x)}₃, {circumflex over (x)}₄, {circumflex over (x)}₅ is theobserved value of x₁, x₂, x₃, x₄, x₅, l₁, l₂, l₃, l₄, l₅ is the observergain to be designed.

In a particular implementation, tracking the planned real-time path ofthe trolley by a Q matrix and an R matrix using a linear quadraticregulator controller comprising the use of the following compositecontrol:

U=K _(x)[{circumflex over (x)} ₁ {circumflex over (x)} ₂ {circumflexover (x)} ₃ {circumflex over (x)} ₄]−{circumflex over (x)} ₅

wherein, K_(x) is the feedback control gain.

FIG. 3 is a control structure diagram of a LQR-based anti-sway controlmethod for a hoisting system according to an embodiment of the presentinvention. Now refer to FIG. 3 , wherein, x* is the target position ofthe trolley, v_(m) is the maximum trolley velocity, a m is the maximumacceleration, x_(r) is the planned real-time path of the trolley, K_(x)is the feedback control gain, U is the control quantity, that is, thecontroller output, d is the lumped disturbance of the system modelingerror and external disturbance, e₁ is the state error, {circumflex over(d)} is the disturbance observation value, and the expanded stateobserver is used to observe the lumped disturbance d and compensate itin the controller, y_(o), y_(m) are output and observable outputrespectively. The stability of the LQR-based anti-sway control method ofthe hoisting system is analyzed. It is assumed that the lumpedinterference d and its derivatives {dot over (d)} are bounded, and thatthe lumped interference d has a constant value in the steady state, thatis, d satisfies

lim t → ∞ d ⁡ ( t ) = d s lim t → ∞ d ˙ ( t ) = 0 ,

wherein d_(s) is a constant vector.

$\left\{ \begin{matrix}{{\overset{.}{\overset{\hat{}}{x}}}_{1} = {{\overset{\hat{}}{x}}_{2} + {l_{1}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{2} = {{\frac{1}{M}\left( {{{- \mu}{\overset{\hat{}}{x}}_{2}} + {mg{\overset{\hat{}}{x}}_{3}} + {\overset{\hat{}}{x}}_{5} + u} \right)} + {l_{2}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{3} = {{\overset{\hat{}}{x}}_{4} + {l_{3}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{4} = {{- {\frac{1}{Ml}\left\lbrack {{{- \mu}{\overset{\hat{}}{x}}_{2}} + {\left( {M + m} \right)g{\overset{\hat{}}{x}}_{3}} + {\overset{\hat{}}{x}}_{5} + u} \right\rbrack}} + {l_{4}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{5} = {l_{5}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}\end{matrix} \right.$

Assuming that the above conditions are satisfied, the extended stateobserver designed l₁, l₂, l₃, l₄, l₅ in the above equation isasymptotically stable.

The error system can be written as the following equation:

$\left\{ \begin{matrix}{{\overset{.}{e}}_{1} = {e_{2} + {l_{1}e_{1}}}} \\{{\overset{.}{e}}_{2} = {{\frac{1}{M}\left( {{{- \mu}e_{2}} + {mge_{3}} + e_{5} + u} \right)} + {l_{2}e_{1}}}} \\{{\overset{.}{e}}_{3} = {e_{4} + {l_{3}e_{1}}}} \\{{\overset{.}{e}}_{4} = {{- {\frac{1}{Ml}\left\lbrack {{{- \mu}e_{2}} + {\left( {M + m} \right)ge_{3}} + e_{5} + u} \right\rbrack}} + {l_{4}e_{1}}}} \\{{\overset{.}{e}}_{5} = {{l_{5}e_{1}} - \overset{˙}{d}}}\end{matrix} \right.$

Wherein, e_(i)={circumflex over (x)}_(i)−x_(i), (i=1, 2, 3, 4, 5)represents the estimation error, the coefficient matrix Ā of the errorsystem is as follows, Ā is a Hurwitz matrix:

$\overset{¯}{A} = \begin{bmatrix}l_{1} & 1 & 0 & 0 & 0 \\l_{2} & {- \frac{\mu}{M}} & {\frac{m}{M}g} & 0 & 1 \\l_{3} & 0 & 0 & 1 & 0 \\l_{4} & \frac{\mu}{Ml} & {{- \frac{M + m}{Ml}}g} & 0 & 1 \\l_{5} & 0 & 0 & 0 & 0\end{bmatrix}$

According to the Input State Stability (ISS) theory, if Ā is a Hurwitzmatrix, it can be concluded that the error system conforms to the ISStheory. It is assumed that the lumped interference d and its derivatives{dot over (d)} are bounded, and that the lumped interference d has aconstant value in the steady state, the stability of the extended stateobserver can be achieved. Therefore, the error dynamics of the extendedstate observer are asymptotically stable and satisfies

${\lim\limits_{t\rightarrow\infty}e_{i}} = 0.$ $\left\{ \begin{matrix}{\overset{˙}{X} = {{AX} + {B\left( {u + d} \right)}}} \\{y_{m} = {C_{m}X}}\end{matrix} \right.$$u = {{K_{x}\overset{\hat{}}{X}} + \overset{\hat{}}{d}}$

Combining the above two formulas, the following closed-loop equations ofthe crane system can be obtained:

{dot over (X)}=(A+BK _(x))X

Wherein, K_(x) is the feedback control gain, {circumflex over (d)} isthe observed value.

The control performance of the LQR-based anti-sway control method of thehoisting system in the embodiment is verified by simulation. After the Qmatrix and R matrix are configured as follows, they can be calculatedK_(x)=[8.94, 19.52, −8.78, 4.47]

${Q = \begin{bmatrix}{80} & 0 & 0 & 0 \\0 & 180 & 0 & 0 \\0 & 0 & 1800 & 0 \\0 & 0 & 0 & {20}\end{bmatrix}},{R = 1}$

The observer gain in the following formula is designed as L=diag(100,397, −776, 1943, −2894)

$\left\{ \begin{matrix}{{\overset{.}{\overset{\hat{}}{x}}}_{1} = {{\overset{\hat{}}{x}}_{2} + {l_{1}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{2} = {{\frac{1}{M}\left( {{{- \mu}{\overset{\hat{}}{x}}_{2}} + {mg{\overset{\hat{}}{x}}_{3}} + {\overset{\hat{}}{x}}_{5} + u} \right)} + {l_{2}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{3} = {{\overset{\hat{}}{x}}_{4} + {l_{3}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{4} = {{- {\frac{1}{Ml}\left\lbrack {{{- \mu}{\overset{\hat{}}{x}}_{2}} + {\left( {M + m} \right)g{\overset{\hat{}}{x}}_{3}} + {\overset{\hat{}}{x}}_{5} + u} \right\rbrack}} + {l_{4}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{5} = {l_{5}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}\end{matrix} \right.$

In the simulation experiment, the effects of whether to use a plannedpath and various controllers are compared. In the first simulation, thecontrol effects of whether to use a planned path are compared. In thesecond simulation, the effects of various controllers are compared, andthe anti-interference performance of the proposed method is tested, thatis, increasing the disturbance when the system reaches the steady state(20 s).

FIG. 4 is a comparison diagram of the trolley displacement, angle andcontrol amount whether a planned path is used in an embodiment of thepresent invention. FIG. 5 shows the control effect comparison diagrambetween the LQR controller based on the extended state observer in anembodiment of the present invention and other controllers. PID marked inFIG. 5 refers to PID (proportional integral derivative control)controller, which is one of the most commonly used controllers. LQR+ESO(Extended State Observer) marked in FIG. 5 represents the combination ofextended state observer and LQR controller. It is obvious from these twofigures that, compared with not using a planned path, although it isslow in place by using a planned path, but its spreader sway angle issmaller and its impact on the actuator is smaller. LQR controller canuse a Q matrix and an R matrix to configure the weight of the trolleydisplacement, spreader sway angle and other state variables, and ESOextended state observer can observe the system disturbance. Therefore,compared with PID controller, LQR controller based on ESO extended stateobserver can better track the path, and the spreader sway angle issmaller. When the system disturbance occurs, it can also quickly recoverwithout static error under the control of this controller.

The embodiment of the present invention also provides a LQR-basedanti-sway control system for a hoisting system, comprising: a serverwhich comprising a memory, a processor and a computer program stored onthe memory and running on the processor, when the the program executedby the processor, the said LQR-based anti-sway control method for thehoisting system is executed.

The embodiment of the present invention also provides a computerreadable storage medium on which a computer program is stored, when theprogram is executed by a processor, the said LQR-based anti-sway controlmethod for the hoisting system is executed.

In summary, a LQR-based anti-sway control method and system for ahoisting system provided by the present invention obtaining a targetposition of a trolley, and obtaining a planned real-time path of thetrolley according to the maximum velocity v_(m) and maximum accelerationa m of the trolley and establishing a dynamic model of the hoistingsystem according to a Lagrange's equation, which can make the hoistingsystem operate more smoothly, reduce sway during operation, and quicklyeliminate sway when in place while observing the lumped disturbanceusing an extended state observer.

Although the present invention has been disclosed as above in apreferred embodiment, it is not intended to limit the present invention.Any person skilled in the art can make some modifications andimprovements without departing from the spirit and scope of the presentinvention. Therefore, the scope of protection of the present inventionshould be subject to those defined in the claims.

1. A LQR-based anti-sway control method for a hoisting system,characterized in that comprising the following steps: obtaining a targetposition of a trolley, and obtaining a planned real-time path of thetrolley according to the maximum velocity v_(m) and maximum accelerationa_(m) of the trolley; establishing a dynamic model of the hoistingsystem according to a Lagrange's equation, for the Lagrange's equation,the trolley displacement x, the spreader sway angle θ, and the ropelength l of the hoisting system being selected as generalized coordinatedirections; observing lumped disturbance d using an extended stateobserver, and compensating for same in a controller, the lumpeddisturbance d comprising the dynamic model error and externaldisturbance to the hoisting system; tracking the planned real-time pathof the trolley by a Q matrix and an R matrix using a linear quadraticregulator controller; wherein, obtaining the planned real-time path ofthe trolley according to the maximum velocity v_(m) and maximumacceleration a_(m) of the trolley specifically comprising the followingformula: ${{\overset{˙}{x}}_{r}(t)} = \left\{ \begin{matrix}{{\frac{v_{m}}{2}\left( {1 - {\cos\pi\frac{2a_{m}}{v_{m}}t}} \right)},{0 < t \leq \frac{v_{m}}{2a_{m}}}} \\{v_{m},{\frac{v_{m}}{2a_{m}} < t \leq {\frac{v_{m}}{2a_{m}} + t_{c}}}} \\{{\frac{v_{m}}{2}\left\lbrack {1 + {\cos\pi\frac{2a_{m}}{v_{m}}\left( {t - \frac{v_{m}}{2a_{m}} - t_{c}} \right)}} \right\rbrack},{{\frac{v_{m}}{2a_{m}} + t_{c}} \leq t \leq {\frac{v_{m}}{a_{m}} + t_{c}}}}\end{matrix} \right.$ wherein, t is the running time of the trolley,t_(c) is the constant velocity time of the trolley, {dot over(x)}_(r)(t) is the real-time velocity of the planned path of thetrolley, obtaining the planned real-time path of the trolley byintegrating {dot over (x)}_(r)(t), the constant velocity time t_(c) isdetermined according to the target position path of the trolley.
 2. TheLQR-based anti-sway control method for the hoisting system according toclaim 1, characterized in that establishing a nonlinear equation of thesystem according to the Lagrange equation as follows:$\left\{ \begin{matrix}{{{\left( {M + m} \right)\overset{¨}{x}} + {m\overset{¨}{l}\sin\theta} + {2m\overset{.}{l}\overset{˙}{\theta}\cos\theta} + {ml\overset{¨}{\theta}\cos\theta} - {ml{\overset{˙}{\theta}}^{2}\sin\theta} + {\mu\overset{.}{x}}} = F} \\{{{2\overset{.}{l}\overset{.}{\theta}} + {l\overset{¨}{\theta}} + {\overset{¨}{x}\cos\theta} + {g\sin\theta}} = 0} \\{{{m\overset{¨}{l}} + {m\overset{¨}{x}\sin\theta} - {ml{\overset{˙}{\theta}}^{2}} - {mg\cos\theta}} = F_{1}}\end{matrix} \right.$ wherein, M is the trolley mass, m is the spreadermass, and l is the rope length, θ is the spreader sway angle, μ is thefriction coefficient, x is the trolley displacement, F is the motorforce, F₁ is the pulling force between the trolley and the spreader, andg is the gravitational acceleration.
 3. The LQR-based anti-sway controlmethod for the hoisting system according to claim 2, characterized inthat the rope length l remains unchanged, the spreader sway angle θ isgreater than −5° and less than 5°, simplifying the nonlinear equation asfollows:${\overset{.}{l} = {\overset{¨}{l} = 0}},{{\cos\theta} \approx 1},{{\sin\theta} \approx \theta}$${{\overset{¨}{\theta}\cos\theta} - {{\overset{˙}{\theta}}^{2}\sin\theta}} = {{\frac{d}{dt}\left( {\overset{˙}{\theta}\cos\theta} \right)} = {{\frac{d}{dt}\left( \overset{˙}{\theta} \right)} = \overset{¨}{\theta}}}$obtaining the following linearization equation by further linearization:$\left\{ \begin{matrix}{{{M\overset{¨}{x}} - {{mg}\theta} + {\mu\overset{.}{x}}} = F} \\{{{l\overset{¨}{\theta}} + \overset{¨}{x} + {g\theta}} = 0}\end{matrix} \right.$
 4. The LQR-based anti-sway control method for thehoisting system according to claim 3, characterized in that obtainingthe following equation by introducing a lumped disturbance d in thelinearization equation: $\left\{ \begin{matrix}{{{M\overset{¨}{x}} - {{mg}\theta} + {\mu\overset{˙}{x}} - d} = F} \\{{{l\overset{¨}{\theta}} + \overset{¨}{x} + {g\theta}} = 0}\end{matrix} \right.$ taking the state variables as the trolleydisplacement x and spreader sway angle θ, input as motor force F,establishing the following state equation, and rewriting the saidequation into the standard state equation form in control theory:$\left\{ \begin{matrix}{\overset{˙}{X} = {{AX} + {B\left( {u + d} \right)}}} \\{y_{m} = {C_{m}X}}\end{matrix} \right.$ wherein: $A = \begin{bmatrix}0 & 1 & 0 & 0 \\0 & {- \frac{\mu}{M}} & \frac{mg}{M} & 0 \\0 & 0 & 0 & 1 \\0 & \frac{\mu}{Ml} & {- \frac{\left( {M + m} \right)g}{Ml}} & 0\end{bmatrix}$ $B = \begin{bmatrix}0 & \frac{1}{M} & 0 & {- \frac{1}{Ml}}\end{bmatrix}^{T}$ $C_{m} = \begin{bmatrix}1 & 0 & 0 & 0\end{bmatrix}$ u is the control variable, X is the vector representingthe system state, y_(m) is the system output, A is the system statematrix, B is the system input matrix, Cm is the system output matrix,and the subscript m represents the directly observable.
 5. The LQR-basedanti-sway control method for the hoisting system according to claim 4,characterized in that a new variable x₅=d is introduced into the stateequation, d is used to represent lumped disturbance:$\left\{ \begin{matrix}{{\overset{˙}{x}}_{1} = x_{2}} \\{{\overset{.}{x}}_{2} = {\frac{1}{M}\left( {{{- \mu}x_{2}} + {mgx_{3}} + x_{5} + u} \right)}} \\{{\overset{˙}{x}}_{3} = x_{4}} \\{{\overset{.}{x}}_{4} = {{- \frac{1}{Ml}}\left( {{{- \mu}x_{2}} + {\left( {M + m} \right)gx_{3}} + x_{5} + u} \right)}} \\{{\overset{.}{x}}_{5} = \overset{.}{d}}\end{matrix} \right.$ y_(m) = C_(m)X wherein, x₁ is the trolleydisplacement, x₂ is the trolley velocity, x₃ is the spreader sway angle,x₄ is the angle velocity of the spreader sway angle.
 6. The LQR-basedanti-sway control method for the hoisting system according to claim 5,characterized in that in order to realize the observation of systemstate and lumped disturbance, the extended state observer is designed asfollows: $\left\{ \begin{matrix}{{\overset{.}{\overset{\hat{}}{x}}}_{1} = {{\overset{\hat{}}{x}}_{2} + {l_{1}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{2} = {{\frac{1}{M}\left( {{{- \mu}{\overset{\hat{}}{x}}_{2}} + {mg{\overset{\hat{}}{x}}_{3}} + {\overset{\hat{}}{x}}_{5} + u} \right)} + {l_{2}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{3} = {{\overset{\hat{}}{x}}_{4} + {l_{3}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{4} = {{- {\frac{1}{Ml}\left\lbrack {{{- \mu}{\overset{\hat{}}{x}}_{2}} + {\left( {M + m} \right)g{\overset{\hat{}}{x}}_{3}} + {\overset{\hat{}}{x}}_{5} + u} \right\rbrack}} + {l_{4}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}} \\{{\overset{.}{\overset{\hat{}}{x}}}_{5} = {l_{5}\left( {{\overset{\hat{}}{x}}_{1} - x_{1}} \right)}}\end{matrix} \right.$ wherein, {circumflex over (x)}₁, {circumflex over(x)}₂, {circumflex over (x)}₃, {circumflex over (x)}₄, {circumflex over(x)}₅ is the observed value of x₁, x₂, x₃, x₄, x₅, l₁, l₂, l₃, l₄, l₅ isthe observer gain to be designed.
 7. The LQR-based anti-sway controlmethod for the hoisting system according to claim 1, characterized inthat tracking the planned real-time path of the trolley by a Q matrixand an R matrix using a linear quadratic regulator controller comprisingthe use of the following composite control:u=K _(x)[{circumflex over (x)} ₁ {circumflex over (x)} ₂ {circumflexover (x)} ₃ {circumflex over (x)} ₄]−{circumflex over (x)} ₅ wherein,K_(x) is the feedback control gain.
 8. A LQR-based anti-sway controlsystem for a hoisting system, characterized in that comprising: a serverwhich comprising a memory, a processor and a computer program stored onthe memory and running on the processor, when the the program executedby the processor, the method of claim 1 is executed.
 9. A computerreadable storage medium on which a computer program is stored,characterized in that when the program is executed by a processor, themethod of claim 1 is executed.